﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using wh40klbModel;

namespace wathammer40kListBuilder.ViewModel
{
    class SquadTypeViewModel:ViewModel
    {
        private SquadType st;
        private int nbMinimum;
        private int nbMaximum;


        public SquadTypeViewModel()
        {
            
        }

        public ArmySquadTypeUsed GetArmyNewSquadTypeUsed(Army a)
        {
            return new ArmySquadTypeUsed
            {
                Army = a,
                ArmyId = a.Id,
                SquadType = this.st,
                SquadTypeId = this.st.Id,
                nbMaximum = this.nbMaximum,
                nbMinimum = this.nbMinimum
            };
        }


        public string Name
        {
            get
            {
                return st.Name;
            }
        }
        public int NbMinimum 
        { 
            get
            {
                return this.nbMinimum;
            }
            set 
            {
                this.nbMinimum = value;
                this.onPropertyChanged("NbMinimum");
            }
        }
        public int NbMaximum 
        {
            get
            {
                return this.nbMaximum;
            }
            set
            {
                this.nbMaximum = value;
                this.onPropertyChanged("NbMaximum");
            }
        }
        public SquadType SquadType 
        { 
            get 
            { 
                return st; 
            } 
            set 
            { 
                this.st = value;
                this.onPropertyChanged("SquadType");
            } 
        }
    }
}
